import Home from "@/pages/Home/Home"
import Login from "../pages/Login/login.vue"
import Search from "@/pages/Search/index"
import  Register from "@/pages/Register/index"
import Detail from "@/pages/Detail/index"
import ShopCart from "@/pages/ShopCart/index"
import AddCartSuccess from "@/pages/AddCartSuccess/index"
import Trade from "@/pages/Trade/index"
 import Pay from "@/pages/Pay/index"
 import PaySuccess from "@/pages/PaySuccess"
 import Center from "@/pages/Center"
 import Myorder from "@/pages/Center/Myorder"
 import orderContent from "@/pages/Center/orderContent"
export default[ 
    {
    path:"/detail/:skuId",
    component:Detail,
  
    },
    {
      path:"/center",
      component:Center,
      meta:{show:true},
      children:[
        {
        path:"/center/orderContent",
        component:orderContent,
      },
      {
        path:"/center/myorder",
        component:Myorder,
      },
      {
        path:"/center",
        redirect:"/center/myorder",
      }
    ]
      },
    {
      path:"/paysuccess",
      component:PaySuccess,
      meta:{show:true}
      },
    {
      path:"/pay",
      component:Pay,
      meta:{show:true}
      },
    {
      path:"/trade",
      component:Trade,
      meta:{show:false}
      },
    {
      path:"/shopCart",
      component:ShopCart,
      name:"/ShopCart",
      },
    {
      path:"/addCartSuccess",
      component:AddCartSuccess,
      name:"AddCartSuccess",
      meta:{show:true}
      
      },
   {
    path:"/home",
    component:Home,
    meta:{show:true}
   
  },
  {
    path:"/",
    redirect:'/login',
    
  },
  {
    path:"/login",
    component:Login,
    meta:{show:false}
  },
  {
   path:"/search/:keyword?",
   component:Search,
   meta:{show:false},
   name:"search",
  },
  {
   path:"/register",
   component:Register,
   meta:{show:false}
  },
  
]
